import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Eingabe {
	public static int leseInt() {
		int i = -1;
		try {
			BufferedReader in = new BufferedReader(new InputStreamReader(
					System.in));
			String s = in.readLine();
			i = Integer.parseInt(s);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return i;
	}

	public static String leseString() {
		String s = "";
		try {
			BufferedReader in = new BufferedReader(new InputStreamReader(
					System.in));
			s = in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return s;
	}
	
	public static double leseDouble() {
		double d = 0.0;
		try {
			BufferedReader in = new BufferedReader(new InputStreamReader(
					System.in));
			String s = in.readLine();
			d  = Double.parseDouble(s);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return d;
	}
	
	public static double readDouble() {
		Boolean end = false;
		double d = 0;
		while(!end){
			try{
				d = leseDouble();
				end = true;
			}catch(Exception e){
				System.out.println("Engabe fehlerhaft, erneute eingabe:");
			}
		}
		return d;
	}
	
	public static String readString() {
		Boolean end = false;
		String s = "";
		while(!end){
			try{
				s = leseString();
				end = true;
			}catch(Exception e){
				System.out.println("Engabe fehlerhaft, erneute eingabe:");
			}
		}
		return s;
	}
	
	public static int readInt() {
		Boolean end = false;
		int i = 0;
		while(!end){
			try{
				i = leseInt();
				end = true;
			}catch(Exception e){
				System.out.println("Engabe fehlerhaft, erneute eingabe:");
			}
		}
		return i;
	}
}
